<template>
  <div class="first"></div>
</template>
<script>
import WOW from "wow.js";
export default {
  name: "Pfirst",
  created() {
    new WOW().init();
  },
  mounted() {
    document.addEventListener("keyup", this.changePage);
  },
  data() {
    return {};
  },
  methods: {
    changePage(e) {
      //右键
      if (e.keyCode == 40||e.keyCode==34) {
        this.$router.push(`/ppt/psecond`);
      }
      //左键
      if (e.keyCode == 38||e.keyCode==33) {
        this.$router.replace(`/ppt/index`);
      }
    }
  },
  beforeDestroy() {
    document.removeEventListener("keyup", this.changePage);
  },
  watch: {
    $route: {
      handler(n, v) {
        document.addEventListener("keyup", this.changePage);
      },
      deep: true
    }
  }
};
</script>
<style lang="scss" scoped>
.first {
  // width: 2800px;
  background-image: url("../../assets/images/pptScreen/pFirst/1.png");
}
</style>